#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# 定义默认参数要牢记一点：默认参数必须指向不变对象！
def demo(name,age=25):
    return name,age

# print(demo('maomao'))

def roommate(like=[]):
    like.append('1')
    return like

# print(roommate()) # ['1']
# print(roommate()) # ['1', '1']
# print(roommate()) # ['1', '1', '1']
# print(roommate([10])) # [10,'1']

def roommates(like=None):
    if like is None:
        like = []
    like.append('1')
    return like

# print(roommates()) # ['1']
# print(roommates()) # ['1']
# print(roommates()) # ['1']
# print(roommates([10])) # [10, '1']